; ModuleID = 'test/test.bc'
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
target triple = "x86_64-unknown-linux-gnu"

@.str = private constant [4 x i8] c"%d\0A\00", align 1

define i32 @main() nounwind {
entry:
  %retval = alloca i32
  %0 = alloca i32
  %a = alloca [100 x i32]
  %i = alloca i32
  %"alloca point" = bitcast i32 0 to i32
  store i32 0, i32* %i, align 4
  br label %bb1

bb:                                               ; preds = %bb1
  %1 = load i32* %i, align 4
  %2 = sext i32 %1 to i64
  %3 = getelementptr inbounds [100 x i32]* %a, i64 0, i64 %2
  %4 = load i32* %i, align 4
  store i32 %4, i32* %3, align 4
  %5 = load i32* %i, align 4
  %6 = add nsw i32 %5, 1
  store i32 %6, i32* %i, align 4
  br label %bb1

bb1:                                              ; preds = %bb, %entry
  %7 = load i32* %i, align 4
  %8 = icmp sle i32 %7, 99
  br i1 %8, label %bb, label %bb2

bb2:                                              ; preds = %bb1
  %9 = load i32* %i, align 4
  %10 = icmp sle i32 %9, 99
  br i1 %10, label %bb3, label %bb4

bb3:                                              ; preds = %bb2
  %11 = load i32* %i, align 4
  %12 = sext i32 %11 to i64
  %13 = getelementptr inbounds [100 x i32]* %a, i64 0, i64 %12
  %14 = load i32* %i, align 4
  store i32 %14, i32* %13, align 4
  br label %bb4

bb4:                                              ; preds = %bb3, %bb2
  %15 = load i32* %i, align 4
  %16 = sext i32 %15 to i64
  %17 = getelementptr inbounds [100 x i32]* %a, i64 0, i64 %16
  %18 = load i32* %17, align 4
  %19 = call i32 (i8*, ...)* @printf(i8* noalias getelementptr inbounds ([4 x i8]* @.str, i64 0, i64 0), i32 %18) nounwind
  %20 = load i32* %i, align 4
  %21 = sub nsw i32 %20, 1
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds [100 x i32]* %a, i64 0, i64 %22
  %24 = load i32* %23, align 4
  %25 = call i32 (i8*, ...)* @printf(i8* noalias getelementptr inbounds ([4 x i8]* @.str, i64 0, i64 0), i32 %24) nounwind
  store i32 0, i32* %0, align 4
  %26 = load i32* %0, align 4
  store i32 %26, i32* %retval, align 4
  br label %return

return:                                           ; preds = %bb4
  %retval5 = load i32* %retval
  ret i32 %retval5
}

declare i32 @printf(i8* noalias, ...) nounwind
